package design.pattern.singleton.hungry;

/**
 * @description: 饿汉式静态块单例
 * @author: liuzhangcheng
 **/
public class HungryStaticSingleton {
    private static final HungryStaticSingleton hungryStaticSingleton;
    static {
        hungryStaticSingleton = new HungryStaticSingleton();
    }

    // 私有化构造函数
    private HungryStaticSingleton(){}

    public static HungryStaticSingleton getInstance() {
        return hungryStaticSingleton;
    }
}
